<template>
    <el-dialog title="查看特殊理箱" :visible.sync="dialogForm" width="1100px">
        <el-form :inline="true" :model="form" ref="form" class="search-form" label-width="100px">
            <el-row>
                <el-col :span="8">
                    <el-form-item label="作业港口：">
                        <!--<auto-search-port-station-->
                        <!--@selectCode="v=>form.portCode=v"></auto-search-port-station>-->
                        {{ form.portName }}
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="作业类型：">
                        {{ form.planType | _filterTsJobStatus }}
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="船代：" prop="shipAgentName">
                        {{ form.shipAgentName }}
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="8">
                    <el-form-item label="箱号：" prop="containerId">
                        {{ form.containerId }}
                        <!--<auto-search-container v-model="form.containerId"></auto-search-container>-->
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="箱型：" prop="containerType">
                        {{ form.containerType }}
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="尺寸：" prop="containerSize">
                        {{ form.containerSize }}
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="8">
                    <el-form-item label="结算单位：" prop="accountUnit">
                        {{ form.accountUnit }}
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="铅封号：">
                        {{ form.sealNo }}
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="内外贸：" prop="tradeType">
                        {{ form.tradeType | _filterTradeType }}
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="8">
                    <el-form-item label="施封日期：">
                        {{ form.finishTime }}
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="理箱人：">
                        {{ form.tallyClerk }}
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="理箱时间：">
                        {{ form.tallyTime }}
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="8">
                    <el-form-item label="进出口：">
                        {{ form.imOrEx | _filterImportExport }}
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="备注：" prop="remark">
                        {{ form.remark }}
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="装箱照片：">
                        <attachments :isPreview="true" v-model="form.attachments" listType="picture-card"></attachments>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button @click="dialogForm = false">关 闭</el-button>
        </div>
    </el-dialog>
</template>

<script>
    import attachments from '@/components/file-upload'

    export default {
        name: "specialDetailForm",
        components: {
            attachments
        },
        data() {
            return {
                isEdit: false,
                dialogForm: false,
                form: this.clearForm(),
            }
        },
        mounted() {
            console.log(this.$route)
        },
        methods: {
            clearForm() {
                return {
                    containerId: "",
                    containerSize: "",
                    containerType: "",
                    tradeType: "",
                    sealNo: "",
                    portCode: "",
                    planType: "",
                    shipAgentName: "",
                    shipAgentId: "",
                    remark: "",
                    accountUnit: "",
                    finishTime: "",
                    tallyClerk: "",
                    imOrEx: "",
                    tallyTime: "",
                    attachments: [],
                }
            },
        },
        watch: {
            dialogForm(bool) {
                if (!bool) {
                    this.$parent.dialogForm = false
                }
            }
        },
    }
</script>

<style scoped>

</style>
